class Parent:
    def __init__(self, score):
        self.score = score


class Son1(Parent):
    def __init__(self, age, *args):
        self.age = age
        super().__init__(*args)


class Son2(Parent):
    def __init__(self, height, *args):
        self.height = height
        super().__init__(*args)


class Grandson(Son1, Son2):
    def __init__(self, name, *args):
        self.name = name
        super().__init__(*args)
    def __str__(self):
        return f'{self.name}年龄{self.age}身高{self.height}分数{self.score}'
xiaoming = Grandson("小明",20,175,98.5)#此时init调用顺序是Grandson、Son1、Son2、Parent
#若想知道复杂继承中的调用顺序可通过print(Grandson.__mro__)
print(xiaoming)
print(Grandson.__mro__)